*** Replication do file
*********************************************
*Understanding Lobbying Dynamics through Survey Research: An Introduction to the InterCov Dataset
*EUP


use "InterCov_Data_EUP_2024.dta"


*reported descriptives: activity
tab Q6
tab Q8

*** Figure 2 
set scheme plotplain
gen Q6_8 = .
replace Q6_8 = Q8
replace Q6_8 = 0 if Q6 == 4
lab define act 0 "No activity" 1 "Only once" 2 "Once a month" 3 "> Once a month" 4 "Once a week" 5 "Daily basis"
lab values Q6_8 act

gen Q13dummy =.
replace Q13dummy= 1 if Q13==4 | Q13==5
replace Q13dummy=0 if Q13==1 | Q13==2 | Q13==3
lab var Q13dummy "Affectedness"
lab define afd 1 "More affected" 0 "Less or equally affected"
lab values Q13dummy afd


hist Q6_8, by (Q13dummy) percent xlabel( 0 "No activity" 1 "Only once" 2 "Once a month" 3 "> Once a month" 4 "Once a week" 5 "Daily basis", angle(45))

*reported despriptives: influence correlation
pwcorr Q20 W2Q12_1, sig

*comment about access changes 
egen megaccesss1 = rowmean (Q12_1 Q12_2 Q12_3 Q12_4 Q12_5)
egen megaccesss2 = rowmean (W2Q7_1 W2Q7_2 W2Q7_3 W2Q7_4 W2Q7_5)

ttest megaccesss1 == megaccesss2
gen accessdiff = megaccesss2 - megaccesss1
hist accessdiff, percent

*comment about affectedness changes 
ttest Q13 == W2Q14
gen affdiff = W2Q14 - Q13
hist affdiff, percent

*reported descriptive: staff change
gen staffdiff = W2Q23 - Q22
tab staffdiff

*reported org type inconsitency
tab Q24 W2Q26






